def A(a, b, c, d):
    if a == 1:
        print(f'移动1号圆盘，{b} ---> {c}')
    else:
        A(a-1, b, d, c)
        print(f'移动{a}号圆盘，{b} ---> {c}')
        A(a-1, d, c, b)

print("汉诺塔问题：")
A(4, 'A', 'C', 'B')
print("\n")